package com.anlu.pattern.create.factory.abstractFactory;

import com.anlu.pattern.common.entity.Bag;
import com.anlu.pattern.common.entity.Fruit;

/**
 * 抽象工厂模式测试
 * @author anlu
 * @create 2019/11/26
 **/

public class OrderSendClient {


    public static void main(String[] args) {
      sendFruit();
    }

    public static void sendFruit(){
        //初始化工厂
        AbstractFactory factory = new BananaFactory();
        //得到水果
        Fruit fruit = factory.getFruit();
        fruit.draw();
        //得到包装
        Bag bag = factory.getBag();
        bag.pack();
    }

}
